package com.monee1988.dubboclient.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.monee1988.dubboapi.buss.ShopApi;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/dubbo")
public class DubboDemoController {

    @Reference(version = "1.0.0",loadbalance = "roundrobin")
    private ShopApi shopApi;

    @GetMapping(value = "/findPage")
    @ResponseBody
    public String findPage() {
        return shopApi.findPage();
    }
}
